package com.tarena.lbs.message.pojo.po;

import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.*;

import java.util.Date;

@Data
@ToString
@Setting(shards = 1, replicas = 0)
@Document(indexName = "lbs_message")
public class MessageSearch {
    @Id
    @Field(type = FieldType.Integer)
    private Integer id;
    @Field(type = FieldType.Integer)
    private Integer userId;
    @Field(type = FieldType.Integer)
    private Integer activityId;
    @Field(type = FieldType.Text)
    private String activityPic;
    @Field(type = FieldType.Integer)
    private Integer type;
    @Field(type = FieldType.Text)
    private String msgTitle;
    @Field(type = FieldType.Text)
    private String content;
    //1.未读 2.已读
    @Field(type = FieldType.Integer)
    private Integer status;
    @Field(type = FieldType.Date, format = {DateFormat.date_hour_minute_second})
    private Date createAt;
}
